package com.dongdong.bookstore.module.cms.viewmodel;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**
 * @author 林泉梁
 * @version 1.0
 */
@Data
public class UpdateUserParam {


    @NotEmpty(message = "用户昵称不能为空")
    @ApiModelProperty(value = "用户昵称", required = true)
    private String nickName;



    @ApiModelProperty(value = "电话")
    @NotEmpty(message = "手机号不能为空")
    @Length(min = 11, max = 11, message = "手机号只能为11位")
    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
    private String tel;

    @Email(message = "邮箱验证错误")
    @ApiModelProperty(value = "邮箱")
    private String email;

}
